package Rozetka.test;

import Rozetka.Pages.HomePage;
import Rozetka.Pages.SearchPage;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

public class SmokeSearch extends TestCondition {

    @DataProvider(name = "SmokeSearch")
    public Object[][] provideData()     {
        return new Object[][]         {
                { "Sony"  },
        };
    }

    @Test(dataProvider = "SmokeSearch")
    public void searchTest(String searchQuery) {
        HomePage home = new HomePage(driver);
        home.open();
        SearchPage search = home.searchProduct(searchQuery);
        Assert.assertTrue(search.isSearchFoundSmoke());
    }
}
